<template>
  <div
    v-if="!$store.state.isLogin"
    @mouseover="isShow = true"
    @mouseleave="isShow = false">
    <img src="../assets/images/head-pic.png" alt="">
    <el-collapse-transition>
      <div v-if="isShow" class="info">
        <ul>
          <li @click="$router.push('/accountManagement')">个人中心</li>
          <li>退出</li>
        </ul>
      </div>
    </el-collapse-transition>
  </div>
</template>

<script>
  export default {
    name: 'Login',
    data () {
      return {
        isShow: false
      }
    }
  }
</script>

<style scoped>
  img {
    width: 46px;
    height: 49px;
  }
  .info {
    position: absolute;
    background: rgba(42, 126, 62, 0.7);
    /*border-radius: 5px;*/
    width: 120px;
    padding: 10px;
    right: 0px;
    z-index: 9999999999;
  }

  .info li {
    list-style: none;
    cursor: pointer;
    color: #fff;
    line-height: 35px;
  }
</style>
